package com.qckj.amz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qckj.common.annotation.Excel;
import com.qckj.common.core.domain.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单信息对象 t_order
 *
 * @author luchuan
 * @since 1.0 2021-11-26
 */
@Entity
@Table(name = "t_order")
@Data
public class Order extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 订单主键自增 */
    @Excel(name = "操作序号", cellType = Excel.ColumnType.NUMERIC)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name="order_id")
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    @Column(name="amazon_order_id")
    private String amazonOrderId;

    /** 市场编号 */
    @Excel(name = "市场编号")
    @Column(name="marketplace_id")
    private String marketplaceId;

    /** 购买时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "购买时间", width = 30, dateFormat = "yyyy-MM-dd")
    @Column(name="purchase_date")
    private Date purchaseDate;

    /** 订单状态 */
    @Excel(name = "订单状态")
    @Column(name="order_status")
    private String orderStatus;

    /** 交付渠道 */
    @Column(name="fulfillment_channel")
    private String fulfillmentChannel;

    /** 订单总价 */
    @Excel(name = "订单总价")
    @Column(name="money_order_total")
    private BigDecimal moneyOrderTotal;

    /** 货币代码 */
    @Column(name="money_currency_code")
    private String moneyCurrencyCode;

    /** 发货数量 */
    @Excel(name = "发货数量")
    @Column(name="number_of_items_shipped")
    private Integer numberOfItemsShipped;

    /** 买家名称 */
    @Column(name="buyer_name")
    private String buyerName;

    /** 买家邮箱 */
    @Column(name="buyer_email")
    private String buyerEmail;

    /** 买家电话 */
    @Column(name="buyer_phone")
    private String buyerPhone;

    /** 地址邮编 */
    @Column(name="address_postal_code")
    private String addressPostalCode;

    /** 地址1 */
    @Column(name="address_line1")
    private String addressLine1;

    /** 地址2 */
    @Column(name="address_line2")
    private String addressLine2;

    /** 地址3 */
    @Column(name="address_line3")
    private String addressLine3;

    /** 国家代码 */
    @Column(name="address_country_code")
    private String addressCountryCode;

    /** 国家名称 */
    @Excel(name = "国家名称")
    @Column(name="address_county_name")
    private String addressCountyName;

    /** 城市 */
    @Column(name="address_city")
    private String addressCity;

    /** 地区 */
    @Column(name="address_state_or_region")
    private String addressStateOrRegion;

    /** 行政区 */
    @Column(name="address_district")
    private String addressDistrict;

    /** 直辖市 */
    @Column(name="address_municipality")
    private String addressMunicipality;

    /** 地址类型 */
    @Column(name="address_type")
    private String addressType;

    /** 部门id */
    @Column(name="dept_id")
    private Long deptId;

    /** 部门名称 */
    @Excel(name = "部门名称")
    @Column(name="dept_name")
    private String deptName;

    /** 创建人 */
    @Column(name="create_by")
    private String createBy;

    /** 创建时间 */
    @Column(name="create_time")
    private Date createTime;

    /** 更新人 */
    @Excel(name = "更新人")
    @Column(name="update_by")
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @Column(name="update_time")
    private Date updateTime;

    /** 备注 */
    @Excel(name = "备注")
    @Column(name="remark")
    private String remark;


}
